"""
URL configuration for web project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, re_path,include
from app01 import views
from django.conf.global_settings import MEDIA_ROOT
from django.views.static import serve
from django.conf import settings
from django.conf.urls.static import static
from django.views import View

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media'),
    re_path(r'^static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}, name='static'),
    # re_path(r'^templates/(?P<path>.*)$', serve, {'document_root': settings.TEMPLATES_ROOT}, name='templates'),#无法辨认模板语法
    path('index/',views.index_web),
    # path('index_register/',views.index_register),
    #注册&登录
    path('register/',views.register),
    #个人订单
    path('order/',views.goods),
    #个人信息
    path('personalinfo/',views.pinfo),
    #添加商品
    path('addgoods/',views.addgoods),
    path('addgood1/',views.addgood1),
    #删除商品
    path('delgoods/',views.delgoods),
    path('sold/',views.sold),
    #编辑商品
    path('edit/',views.orderedit),
    path('changegoods/',views.changegoods),
    #修改状态
    path('changevis/',views.changevis),
    #校区筛选商品
    path('fcampus/',views.fcampus),
    path('hcampus/',views.hcampus),
    #登出
    path('vlogout/',views.vlogout),
    
    path('test/',views.test),
   
]
